package com.coderg.gmall.cart.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.coderg.gmall.model.cart.CartInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * 购物车dao层
 */
@Mapper
public interface CartInfoMapper extends BaseMapper<CartInfo> {
    @Update("UPDATE cart_info SET is_checked = #{status} WHERE user_id = #{username}")
    void checkAll(@Param("username") String username,
                  @Param("status") short status);
}
